<div class="wrap">
	<div class="header">
		<span id="return">返回上一级</span>
	</div>
	<ul class="order_list">
		<li>
			<label>订单编号</label>
			<span id="orderNum"></span>
		</li>
		<li>
			<label>耗材类型</label>
			<span>纸张</span>
		</li>
		<li>
			<label>纸张品种</label>
			<select id="paperType">
				<option>凸版纸</option>
				<option>新闻纸</option>
				<option>胶版纸</option>
				<option>铜版纸</option>
				<option>画报纸</option>
				<option>书皮纸</option>
				<option>压纹纸</option>
				<option>书写纸</option>
				<option>拷贝纸</option>
				<option>打字纸</option>
				<option>牛皮纸</option>
			</select>
		</li>
		<li>
			<label>纸张规格</label>
			<select id="paperSize">
				<option>787*1092</option>
				<option>850*1168</option>
				<option>880*1230</option>
				<option>787</option>
				<option>1092</option>
				<option>1575</option>
			</select>
		</li>
		<li>
			<label>纸张数量</label>
			<input type="text" id="paperNum">
		</li>
		
		<li>
			<label>耗材类型</label>
			<span>油墨</span>
		</li>
		<li>
			<label>油墨品种</label>
			<select id="inkType">
				<option>胶印油墨</option>
				<option>卷筒纸胶印油墨</option>
				<option>平胶印油墨</option>
				<option>无水胶印油墨</option>
				<option>铜板油墨</option>
				<option>凸版轮转油墨</option>
				<option>柔性凸版油墨</option>
				<option>书刊黑墨</option>
				<option>轮转黑墨</option>
				<option>彩色凸版油墨</option>
				<option>雕刻凹版油墨</option>
			</select>
		</li>
		<li>
			<label>油墨数量</label>
			<input type="text" id="inkNum">
		</li>
		<li>
			<label>耗材类型</label>
			<span>工艺材料</span>
		</li>
		<li>
			<label>材料品种</label>
			<select id="materialType">
				<option>覆膜</option>
				<option>UV上光</option>
				<option>胶装</option>
				<option>骑马钉</option>
				<option>压凸</option>
				<option>压型</option>
				<option>裱糊</option>
				<option>烫金</option>
				<option>烫银</option>
			</select>
		</li>
		<li>
			<label>材料数量</label>
			<input type="text" id="materialNum">
		</li>
		<li>
			<label>版材类型</label>
			<span>版材</span>
		</li>
		<li>
			<label>版材品种</label>
			<select id="boardType">
				<option>铝版</option>
				<option>锌版</option>
				<option>网版</option>
				<option>树脂版</option>
				<option>PS版</option>
			</select>
		</li>
		<li>
			<label>版材数量</label>
			<input type="text" id="boardNum">
		</li>
		<li>
			<a href="javascript:void(0)" id="orderSubmit">提交</a>
		</li>
	</ul>
</div>
<script>
	//用cookie获取id
	var id = $.cookie("id");
	$("#orderNum").text(id);
	//返回上一级
	$("#return").on("click",function(){
		$("#main").empty();
		$.ajax({
			type:"get",
			url:"product_list_detail.html",
			success:function(res){
				$("#main").append(res);
			}
		});
	})
	//添加耗材单
	$("#orderSubmit").on("click",function(){
		var order_id = id,
			paper_type = $("#paperType").val(),
			paper_size = $("#paperSize").val(),
			paper_num = $("#paperNum").val(),
			ink_type = $("#inkType").val(),
			ink_num = $("#inkNum").val(),
			material_type = $("#materialType").val(),
			material_num = $("#materialNum").val(),
			board_type = $("#boardType").val(),
			board_num = $("#boardNum").val();
			
		$.ajax({
			type:"post",
			url:"http://39.108.164.20/device/SysUser/InsSupplies",
			data:{
				order_id:order_id,
				paper_type:paper_type,
				paper_size:paper_size,
				paper_num:paper_num,
				ink_type:ink_type,
				ink_num:ink_num,
				material_type:material_type,
				material_num:material_num,
				board_type:board_type,
				board_num:board_num
			},
			dataType:"json",
			success:function(res){
				alert(res.result.msg)
			}
		});
	})
</script>